{% extends "base_categories.html" %}

{% block title %}| Search{% endblock %}

{% block content %}
<div class="content">
	<div class="search_box">
		<form method="get" action="/search/">
			<p><label for="id_q">Search:</label>
			<input type="text" name="q" id="id_q" />
			<input type="submit" value="Submit" /></p>
		</form>
	</div>
	{% if keyword_results or results %}
		<p>You searched for "{{ query }}".</p>
		{% if keyword_results %}
			<p>Recommended pages:</p>
			<ul>
				{% for page in keyword_results %}
					<li><a href="{{ page.get_absolute_url }}">{{ page.title }}</a></li>
				{% endfor %}
			</ul>
		{% endif %}
		{% if results %}
			<p>Search results:</p>
			<ul>
				{% for page in results %}
					<li><a href="{{ page.get_absolute_url }}">{{ page.title }}</a></li>
				{% endfor %}
			</ul>
		{% endif %}
	{% endif %}
	{% if query and not keyword_results and not results %}
		<p>No results found.</p>
	{% else %}
		<p>Type a search in the box above, and press "Submit"
			to search.</p>
	{% endif %}
</div>
{% endblock %}

{% block whatis %}
<p>This is a view that can be used for searching in the static pages and display search results.</p>
{% endblock %}
